package com.cyou.qb.common.service;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

import com.cyou.nad.datastore.query.JdbcPage;
import com.cyou.qb.common.domain.QiangbaAdmin;
import com.cyou.qb.service.BaseService;

/**
 * <p>AccountService</p>
 * <p>
 * Description:账号管理service
 * </p>
 *
 * @author lidongwei
 * @version 
 * @since 2012-9-19
 */
public interface AccountService extends BaseService {

	/**
	 * Description
	 * @author lidongwei 添加
	 * @throws Exception 
	 * @since 2012-9-19
	 */
	public int saveOneAdmin(String loginName, String dept, String userName, String adminType);

	/**
	 * Description 删除
	 * @author lidongwei
	 * @since 2012-9-19
	 */
	public int removeAdmin(List<String> adminId);

	/**
	 * 设置用户锁状态
	 * @param adminId
	 * @param pTag
	 */
	public void updateLockStatus(List<String> adminId, String pTag);

	/**
	 * 修改密码
	 * @param adminId
	 * @param password
	 */
	public void updatePassword(Integer adminId, String password);

	/**
	 * Description 修改多字段
	 * @author lidongwei
	 * @throws NoSuchMethodException 
	 * @throws InvocationTargetException 
	 * @throws IllegalAccessException 
	 * @since 2012-9-19
	 */
	public void updateAccount(Integer adminId, String dept, String userName, String adminType)
			throws IllegalAccessException, InvocationTargetException, NoSuchMethodException;

	/**
	 * 分页查询后台账号
	 * @param loginName
	 * @param dept
	 * @param name
	 * @param type
	 * @param valid
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	public JdbcPage pageQueryAccount(String loginName, String dept, String name, String type, String status,
			int pageNo, int pageSize);


	/**
	 * 校验用户名是否存在，存在: true，不存在:false
	 * @param loginName
	 * @return
	 */
	public boolean checkLoginNameExist(String loginName);

	/**
	 * Description 判断是否登录成功
	 * @author lidongwei
	 * @since 2012-9-23
	 */
	public QiangbaAdmin checkLogin(String loginName, String password);

	/**
	 * Description 重置密码
	 * @author lidongwei
	 * @since 2012-9-25
	 */
	public void updateResetPassword(List<String> adminIds);

	/**
	 * Description
	 * @author lidongwei
	 * @since 2012-10-12
	 */
	public void updateOneAccount(QiangbaAdmin qiangbaAdmin);

}
